// import java.util.Scanner;
public class Pii{

    public static  double Pai(int p){
          double pi = 0;
        for (int i=0;i<p;i++) {
            // TODO
            // System.out.println("1");
            if(i%2==0){
                pi=pi+((double)1/(2*i+1));
            }else{
                pi=pi-((double)1/(2*i+1));
            }

        }
            return 4*pi;
            }
    public static void main(String[] args) {
        
        // Scanner scanner =new Scanner(System.in);
        // int a = scanner.nextInt();
        // double pp=Pai(a);
        double pp = Pai(100000000)
      System.out.println(pp);

    }
}
